package com.zjj.learn.designmodel.work.command;

/**
 * 调用者：遥控器
 * 需要聚合命令接口才能执行相应的命令
 **/
public class RemoteControl {

    private Command command;

    public void setCommand(Command command) {
        this.command = command;
    }

    /**
     * 点击遥控器按钮就可以实现 Command 的命令了
     **/
    public void pressButton(){
        command.execute();
    }
}
